<?php
/*
	本插件：$this->model('model')->方法名();
	其他地方调用：model('jy_renwushop/model')->方法名();
*/
namespace jy_renwushop;
defined('BY_JYA') or exit('error');
class model extends \plugin{
	public function set_canyulog($params,$type=0){
		$insert=array(
			'uniacid'=>$_SESSION['uniacid'],
			'mid'=>$params['mid']?:$_SESSION['uid'],
			'renwuid'=>$params['renwuid'],
			'msg'=>$params['msg'],
			'status'=>$params['status'],
			'type'=>$type,
			'createtime'=>TIMESTAMP
		);
		$this->pdo_insert('canyulog',$insert);
		return true;
	}
	/*
		日志信息
	*/
	public function set_log($params,$type=0){
		$insert=array(
			'uniacid'=>$_SESSION['uniacid'],
			'mid'=>$params['mid']?:$_SESSION['uid'],
			'msg'=>$params['msg'],
			'status'=>$params['status'],
			'type'=>$type,
			'createtime'=>TIMESTAMP
		);
		$this->pdo_insert('log',$insert);
		return true;
	}
	/*
		费用信息
	*/
	public function set_feelog($params,$type=0){
		$insert=array(
			'uniacid'=>$_SESSION['uniacid'],
			'mid'=>$params['mid']?:$_SESSION['uid'],
			'msg'=>$params['msg'],
			'fee'=>$params['fee'],
			'status'=>$params['status'],
			'renwuid'=>$params['renwuid'],
			'isadd'=>$params['isadd'],
			'type'=>$type,
			'createtime'=>TIMESTAMP
		);
		$this->pdo_insert('feelog',$insert);
		return true;
	}
}
?>